<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    {{-- 普通表单提交验证 --}}
    {{-- 错误信息显示 --}}
    <p>
        @if ($errors->any())
            <ul>
                @foreach ($errors->all() as $item)
                    <li>{{ $item }}</li>
                @endforeach
            </ul>
        @endif
    </p>
    <form action="" method="post">
        {{-- CSRF表单项 --}}
        @csrf
        <p>
            <label for="">用户名称
                {{-- 提交时有错误不会重置value值 --}}
                <input type="text" name="username" value="{{ old('username') }}">
            </label>
        </p>
        <p>
            <label for="">密码
                <input type="password" name="password" id="">
            </label>
        </p>
        <p>
            <label for="">确认密码
                <input type="password" name="password_confirmation" id="">
            </label>
        </p>
        <p>
            <label for="">邮箱
                <input type="text" name="email" id="">
            </label>
        </p>
        <p>
            <label for="">QQ
                <input type="text" name="qq" id="">
            </label>
        </p>
        <p>
            <input type="submit" value="用户注册">
        </p>
    </form>
</body>
</html>